var express = require('express');
var router = new express.Router();
var Mock = require('mockjs')
var platforms=require('./data/platforms')

router.get('/list', function (req, res){
  /*var platform= Mock.mock({*/
   /* 'list|5': [{

      'gender|1':['',''],
      'pick|1':['',''],
      'department|1':[{
        name: '',
        count:4
      },{
        name:''
      },{
        name:''
      },{
        name:''
      },
      ],
      'export|1':[{
        name:'',
        count: 5
      },{
        name:''
      },{
        name:''
      },{
        name:''
      },{
        name:''
      },],


    }]
  })*/


  res.send(platforms);
})



//var employee=require('./data/employee')
var platform=[];

router.get('/add',function (request,response) {
  console.log(request.query);
  platform.unshift(request.query)
  response.send({
    plat:platform,
    flag:true
  })
})



module.exports= router;
//module.exports = employee.list;
